import request from '@/utils/request'

// 查询操作日志列表
export function list(query) {
  return request({
    url: '/admin/order/list',
    method: 'get',
    params: query
  })
}

// 商户订单
export function agentList(query) {
  return request({
    url: '/agent/order/list',
    method: 'get',
    params: query
  })
}


// 删除操作日志
export function send(id) {
  return request({
    url: '/admin/order/send?id=' + id,
    method: 'get'
  })
}
// 取消订单
export function cancel(id) {
  return request({
    url: '/admin/order/cancel?id=' + id,
    method: 'get'
  })
}
// 确认收款
export function finish(id) {
  return request({
    url: '/admin/order/finish?id=' + id,
    method: 'get'
  })
}
// 释放资金
export function release(id) {
  return request({
    url: '/admin/order/release?id=' + id,
    method: 'get'
  })
}

// 释放资金
export function reject(id) {
  return request({
    url: '/admin/order/reject?id=' + id,
    method: 'get'
  })
}
export function notice(id) {
  return request({
    url: '/admin/order/notice?id=' + id,
    method: 'get'
  })
}

// 清空操作日志
export function cleanOperlog() {
  return request({
    url: '/monitor/operlog/clean',
    method: 'delete'
  })
}


// 代付订单列表
export function orderPayList(query) {
  return request({
    url: '/admin/orderPay/list',
    method: 'get',
    params: query
  })
}


// 代付订单列表
export function hasPaid(query) {
  return request({
    url: '/admin/orderPay/list',
    method: 'get',
    params: query
  })
}

// 新增订单
export function add(data) {
  return request({
    url: '/admin/order/add',
    method: 'post',
    data: data
  })
}

// 新增订单
export function createOrder(data) {
  return request({
    url: '/admin/order/createOrder',
    method: 'post',
    data: data
  })
}

// 手动新增指定用户订单
export function createOrderByPhone(data) {
  return request({
    url: '/admin/order/createOrderByPhone',
    method: 'post',
    data: data
  })
}

